﻿using System;
using System.Globalization;
using System.Windows.Data;

namespace TweeVo
{
	public class EncryptionConverter : IValueConverter
	{
		// decrypt
		public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
		{
			return (value as string).DecryptString();
		}

		// encrypt
		public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
		{
			return (value as string).EncryptString();
		}
	}
}
